import request from '@/utils/request';

//获取日志接口枚举
export function getLoggerType() {
	return request({
		method: 'get',
		headers: { noNeedLogin: true },
		url: 'openApi/system/defEnumList'
	})
}

//系统附件下载
export function attachDownload(id) {
	return request({
		method: 'get',
		headers: { noNeedLogin: true },
		url: 'openApi/system/download/' + id
	})
}

//通过账号查询用户基本信息
export function getUserByAccount(account) {
	return request({
		method: 'get',
		headers: { noNeedLogin: true },
		url: 'openApi/system/getInfoByAccount/' + account
	})
}

//通过ID查询用户基本信息
export function getUserById(id) {
	return request({
		method: 'get',
		headers: { noNeedLogin: true },
		url: 'openApi/system/getInfoById/' + id
	})
}

//服务监控接口
export function getServerData() {
	return request({
		method: 'get',
		headers: { noNeedLogin: true },
		url: 'openApi/system/getServer'
	})
}

//通过用户ID获取用户头像信息
export function getAvatarById(id) {
	return request({
		method: 'get',
		headers: { noNeedLogin: true },
		url: 'openApi/system/queryIconByUserId/' + id
	})
}

//获取附件地址
export function getAttachUrl(data) {
	return request({
		method: 'get',
		headers: {
			noNeedLogin: true
		},
		url: 'openApi/system/queryPathById/' + data,
	})
}

//获取网站基本信息
export function siteBaseInfo() {
	return request({
		method: 'get',
		headers: {
			noNeedLogin: true
		},
		url: 'openApi/system/querySite'
	})
}